package wei.xinya.pattern.structural.Decorator;

public class DecoratorPatternDemo {
    public static void main(String[] args) {

        Shape circle = new Circle();
        Rectangle rectangle = new Rectangle();

        Shape redCircle = new RedShapeDecorator(circle);
        Shape redRectangle = new RedShapeDecorator(rectangle);
        Shape BlueCircle = new BlueShapeDecorator(circle);
        Shape BlueRectangle = new BlueShapeDecorator(rectangle);

        System.out.println("Circle with normal border");
        circle.draw();

        System.out.println("\nCircle of red border");
        redCircle.draw();

        System.out.println("\nRectangle of red border");
        redRectangle.draw();

        System.out.println("\nCircle of blue border");
        BlueCircle.draw();

        System.out.println("\nRectangle of blue border");
        BlueRectangle.draw();
    }
}
